/**
 * Project: demo.web
 * 
 * File Created at 2009-9-28
 * $Id$
 * 
 * Copyright 2008 Alibaba.com Croporation Limited.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * Alibaba Company. ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with Alibaba.com.
 */
package com.alibaba.hello.controller;

import com.alibaba.roma.web.servlet.result.Forward;
import com.alibaba.roma.web.servlet.result.Redirect;
import com.alibaba.roma.web.servlet.result.View;
import com.alibaba.roma.web.servlet.result.WebResult;
import com.alibaba.roma.web.uribroker.impl.BrokerURI;

/**
 * TODO Comment of WebResultController
 * 
 * @author sesame.yangj
 */
public class WebResultController {
    public WebResult forward1() {
        return new Forward(new BrokerURI("welcome", "index"));
    }

    public WebResult forward3() {
        return new Forward("/hello/welcome/index");
    }

    public WebResult forward2() {
        return new Forward("forward3");
    }

    public WebResult redirect1() {
        return new Redirect(new BrokerURI("welcome", "index.htm"));
    }

    public WebResult redirect2() {
        return new Redirect("/hello/welcome/index.htm");
    }

    public WebResult redirect3() {
        return new Redirect("redirect2.htm");
    }

    public WebResult view1() {
        return new View("/hello/welcome/index");
    }

    public WebResult view2() {
        return new View(new BrokerURI("welcome", "index"));
    }

}
